package com.reptile.controller;


import com.common.pojo.Result;
import com.reptile.handle.YsTechnologyHandle;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;

/**
 * 测试技术定时任务
 * @author songyafei
 */
@Api(value = "测试技术定时任务")
@RestController
@RequestMapping("te")
public class TechnologyController {

   @Resource
   private YsTechnologyHandle ysTechnologyHandle;

    @GetMapping("/kaiYSk")
    @ApiOperation(value = "测试爬取开源中国技能专区数据",notes = "测试")
    public Result<?> kaiYSk() throws Exception {
        Result result = new Result();
        ysTechnologyHandle.KaiYDevelopingSkillsExecute();
        return result.OK(true);
    }

    @GetMapping("/wen")
    @ApiOperation(value = "爬取开源中国问答专区数据",notes = "测试")
    public Result<?> wen() throws Exception {
        Result result = new Result();
        ysTechnologyHandle.KaiYAnswersNewsExecute();
        return result.OK(true);
    }
    @GetMapping("/com")
    @ApiOperation(value = "爬取开源中国综合资讯专区数据",notes = "测试")
    public Result<?> com() throws Exception {
        Result result = new Result();
        ysTechnologyHandle.KaiYComprehensiveInfoNewsExecute();
        return result.OK(true);
    }
    @GetMapping("/db")
    @ApiOperation(value = "爬取开源中国数据库专区数据",notes = "测试")
    public Result<?> db() throws Exception {
        Result result = new Result();
        ysTechnologyHandle.KaiYDataBaseNewsExecute();
        return result.OK(true);
    }
    @GetMapping("/so")
    @ApiOperation(value = "爬取开源中国软件更新专区数据",notes = "测试")
    public Result<?> so() throws Exception {
        Result result = new Result();
        ysTechnologyHandle.KaiYSoftwareUpdateNewsExecute();
        return result.OK(true);
    }


}
